package com.guimin.order.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * 添加预约订单
 * @author Administrator
 */
@Data
public class AddYuyueOrderDto {
    /**预约人*/
    @NotBlank(message = "预约人不能为空")
    @Size(max = 10)
    private String userName;
    /**手机号*/
    @NotBlank(message = "手机号不能为空")
    @Size(max = 20)
    private String phone;
    /**服务名称*/
    @NotNull(message = "服务ID不能为空")
    private Long serviceId;
    /**服务名称*/
    @NotBlank(message = "服务名称不能为空")
    @Size(max = 20)
    private String serviceName;
    /**服务日期*/
    @NotNull(message = "服务日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date serviceDate;
    /**预约地点*/
    @NotBlank(message = "预约地点不能为空")
    @Size(max = 100)
    private String serviceSite;
}
